{% load future wenlincms_tags wlcore_tags report_tags %}

<div class="report-box hidetrbox">
    <h3 class="report-title">企业对外投资</h3>
    <span class="report-numallbox"><span class="report-numbox">{{ el_entinvs.count|elweizhi:5 }}</span>条</span>

    <div class="hidetr_btn" val="0">&or;&nbsp;显示全部</div>
    <table class="report-table">
        <tr>
            <th width="220">被投企业</th>
            <th width="100">认缴出资额（万元）</th>
            <th width="60">币种</th>
            <th width="60">出资比例</th>
            <th width="60">出资日期</th>
        </tr>
        {% for res in el_entinvs %}
            <tr class="hidetr">
                <td><a class="otherentatag" href="{{ res.entid.get_report_url }}" target="_blank">{{ res.entid.ENTNAME }}</a></td>
                <td class="cf3">{{ res.SUBCONAM|elfloat:1|elweizhi }}</td>
                <td>{{ res.CURRENCY|elweizhi }}</td>
                <td>{{ res.CONPROP|elfloat:3|elweizhi }}</td>
                <td>{{ res.CONDATE|date:"Y-m-j"|elweizhi }}</td>
            </tr>
        {% endfor %}
    </table>
</div>

<div class="report-box hidetrbox">
    <h3 class="report-title">法人对外投资</h3>
    <span class="report-numallbox"><span class="report-numbox">{{ el_frinvs.count|elweizhi:5 }}</span>条</span>

    <div class="hidetr_btn" val="0">&or;&nbsp;显示全部</div>
    <table class="report-table">
        <tr>
            <th width="60">姓名</th>
            <th width="210">被投企业</th>
            <th width="100">认缴出资额（万元）</th>
            <th width="60">币种</th>
            <th width="60">出资比例</th>
            <th width="60">出资日期</th>
        </tr>
        {% for res in el_frinvs %}
            <tr class="hidetr">
                <td>{{ res.INV }}</td>
                <td><a class="otherentatag" href="{{ res.entid.get_report_url }}" target="_blank">{{ res.entid.ENTNAME }}</a></td>
                <td class="cf3">{{ res.SUBCONAM|elfloat:1|elweizhi }}</td>
                <td>{{ res.CURRENCY|elweizhi }}</td>
                <td>{{ res.CONPROP|elfloat:3|elweizhi }}</td>
                <td>{{ res.CONDATE|date:"Y-m-j"|elweizhi }}</td>
            </tr>
        {% endfor %}
    </table>
</div>

{% if version == "10" %}
    <div class="report-box hidetrbox">
        <h3 class="report-title">股东高管对外投资</h3>
        <span class="report-numallbox"><span class="report-numbox">{{ el_personinvs|length|elweizhi:5 }}</span>条</span>

        <div class="hidetr_btn" val="0">&or;&nbsp;显示全部</div>
        <table class="report-table">
            <tr>
                <th width="60">姓名</th>
                <th width="210">被投企业</th>
                <th width="100">认缴出资额（万元）</th>
                <th width="60">币种</th>
                <th width="60">出资比例</th>
                <th width="60">出资日期</th>
            </tr>
            {% for res in el_personinvs %}
                <tr class="hidetr">
                    <td>{{ res.INV }}</td>
                    <td><a class="otherentatag" href="{{ res.entid.get_report_url }}" target="_blank">{{ res.entid.ENTNAME }}</a></td>
                    <td class="cf3">{{ res.SUBCONAM|elfloat:1|elweizhi }}</td>
                    <td>{{ res.CURRENCY|elweizhi }}</td>
                    <td>{{ res.CONPROP|elfloat:3|elweizhi }}</td>
                    <td>{{ res.CONDATE|date:"Y-m-j"|elweizhi }}</td>
                </tr>
            {% endfor %}
        </table>
    </div>
{% endif %}

<div class="report-box hidetrbox">
    <h3 class="report-title">法人在外任职</h3>
    <span class="report-numallbox"><span class="report-numbox">{{ el_frpositions.count|elweizhi:5 }}</span>条</span>

    <div class="hidetr_btn" val="0">&or;&nbsp;显示全部</div>
    <table class="report-table">
        <tr>
            <th width="60">姓名</th>
            <th width="220">任职企业</th>
            <th width="100">职务</th>
            <th width="60">是否法人</th>
            <th width="60">任职自</th>
            <th width="60">任职至</th>
        </tr>
        {% for res in el_frpositions %}
            <tr class="hidetr">
                <td>{{ res.NAME }}</td>
                <td><a class="otherentatag" href="{{ res.entid.get_report_url }}" target="_blank">{{ res.entid.ENTNAME }}</a></td>
                <td class="cf3">{{ res.get_POSITION_display|elweizhi }}</td>
                <td>{{ res.LEREPSIGN|elbool }}</td>
                <td>{{ res.OFFHFROM|date:"Y-m-j"|elweizhi }}</td>
                <td>{{ res.OFFHTO|date:"Y-m-j"|elweizhi }}</td>
            </tr>
        {% endfor %}
    </table>
</div>

{% if version == "10" %}
    <div class="report-box hidetrbox">
        <h3 class="report-title">股东高管在外任职</h3>
        <span class="report-numallbox"><span
                class="report-numbox">{{ el_personpositions|length|elweizhi:5 }}</span>条</span>

        <div class="hidetr_btn" val="0">&or;&nbsp;显示全部</div>
        <table class="report-table">
            <tr>
                <th width="60">姓名</th>
                <th width="210">任职企业</th>
                <th width="100">职务</th>
                <th width="60">是否法人</th>
                <th width="60">任职自</th>
                <th width="60">任职至</th>
            </tr>
            {% for res in el_personpositions %}
                <tr class="hidetr">
                    <td>{{ res.NAME }}</td>
                    <td><a class="otherentatag" href="{{ res.entid.get_report_url }}" target="_blank">{{ res.entid.ENTNAME }}</a></td>
                    <td class="cf3">{{ res.get_POSITION_display|elweizhi }}</td>
                    <td>{{ res.LEREPSIGN|elbool }}</td>
                    <td>{{ res.OFFHFROM|date:"Y-m-j"|elweizhi }}</td>
                    <td>{{ res.OFFHTO|date:"Y-m-j"|elweizhi }}</td>
                </tr>
            {% endfor %}
        </table>
    </div>

    {#    <div class="report-box">#}
    {#        <iframe src="{{ el_post.get_report_url }}tupu/?isiframe=1&dstyle=1" width="100%" height="620px"#}
    {#                frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no" allowtransparency="yes"></iframe>#}
    {#    </div>#}
{% endif %}

<div class="report-box hidetrbox">
    <h3 class="report-title">企业分支机构</h3>
    <span class="report-numallbox"><span class="report-numbox">{{ el_filiations.count|elweizhi:5 }}</span>条</span>

    <div class="hidetr_btn" val="0">&or;&nbsp;显示全部</div>
    <table class="report-table ">
        <tr>
            <th width="200">分支机构名称</th>
            <th width="140">分支机构企业注册号</th>
            <th width="100">分支机构负责人</th>
            <th width="200">分支机构地址</th>
        </tr>
        {% for res in el_filiations %}
            <tr class="hidetr">
                <td>{{ res.BRNAME }}</td>
                <td>{{ res.BRREGNO|elweizhi }}</td>
                <td>{{ res.BRPRINCIPAL|elweizhi }}</td>
                <td>{{ res.BRADDR|elweizhi }}</td>
            </tr>
        {% endfor %}
    </table>
</div>

<script>
    hidetrbox();
    hrefortab();
</script>
